<template>
    <el-menu
        :default-active="activeMenu"
        :router="router"
        v-bind="$attrs"
    >
        <item :menu="data"></item>
    </el-menu>
</template>

<script setup lang="ts">
  import Item from './item.vue'
  import { MenuItem } from '../menu/type'

  let props = defineProps({
    data: {
        type: Array as PropType<MenuItem[]>,
        required: true
    },
    activeMenu: {
        type: String,
        default: ''
    },
    router: {
        type: Boolean,
        default: false
    }
  })
  console.log(props.data);
  
</script>

<style scoped>

</style>
